package net.shenru.os.utlis;

/**
 * 生成UUID
 */
public class UniqueIdGenerator {

	private int odlIntId;
	private int odlLongId;

	private static UniqueIdGenerator instance;

	private UniqueIdGenerator() {

	}

	public static synchronized UniqueIdGenerator getInstance() {
		if (instance == null) {
			instance = new UniqueIdGenerator();
		}
		return instance;
	}

	public synchronized int getIntId() {
		return odlIntId++;
	}

	public synchronized long getLongId() {
		return odlLongId++;
	}

}
